package com.bifrost.model.vo;

import com.bifrost.entity.User;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

/**
 * Author by yanxiaobo
 * Date on 2018/4/16$.
 */
@Getter
@Setter
@Builder
public class UserVO {
    private Long userId;
    private String username;
    private String mobile;

    public static UserVO adapter(User user) {
        UserVO userVO = UserVO.builder()
                .userId(user.getId())
                .username(user.getAdminName())
                .mobile(user.getAdminPhone())
                .build();
        return userVO;
    }
}
